package widget.common.io.socket
{
	import flash.utils.ByteArray;
	import flash.utils.Endian;

	public class SocketDataCollection{
		
		private const MSG_TYPE_INT:int = 2;
		
		private var byteArray:ByteArray = null;
		public function SocketDataCollection(byte:ByteArray = null)
		{
			if(byte == null){
				byteArray = new ByteArray();
			}else{
				byteArray = byte;
			}
			byteArray.position = 0;
			byteArray.endian = Endian.LITTLE_ENDIAN;
		}
		
		public function writeMsgNum(param:int):void
		{
			
		}
		
		public function writeCInt(param:int):void
		{
			byteArray.writeByte(MSG_TYPE_INT);
			byteArray.writeInt(param);
		}
		
		public function readCInt():int
		{
			byteArray.readByte();
			return byteArray.readInt();
		}
	}
}